3.2.28 \(\int \sin ^2(e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx\) [128]

3.2.28.1 Optimal result
3.2.28.2 Mathematica [A] (verified)
3.2.28.3 Rubi [A] (verified)
3.2.28.4 Maple [A] (verified)
3.2.28.5 Fricas [F]
3.2.28.6 Sympy [F]
3.2.28.7 Maxima [F]
3.2.28.8 Giac [F]
3.2.28.9 Mupad [F(-1)]

3.2.28.1 Optimal result

Integrand size = 25, antiderivative size = 159 \[ \int \sin ^2(e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=-\frac {\cos (e+f x) \sin (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}+\frac {(a+2 b) E\left (e+f x\left |-\frac {b}{a}\right .\right ) \sqrt {a+b \sin ^2(e+f x)}}{3 b f \sqrt {1+\frac {b \sin ^2(e+f x)}{a}}}-\frac {a (a+b) \operatorname {EllipticF}\left (e+f x,-\frac {b}{a}\right ) \sqrt {1+\frac {b \sin ^2(e+f x)}{a}}}{3 b f \sqrt {a+b \sin ^2(e+f x)}} \]

output
-1/3*cos(f*x+e)*sin(f*x+e)*(a+b*sin(f*x+e)^2)^(1/2)/f+1/3*(a+2*b)*(cos(f*x 
+e)^2)^(1/2)/cos(f*x+e)*EllipticE(sin(f*x+e),(-b/a)^(1/2))*(a+b*sin(f*x+e) 
^2)^(1/2)/b/f/(1+b*sin(f*x+e)^2/a)^(1/2)-1/3*a*(a+b)*(cos(f*x+e)^2)^(1/2)/ 
cos(f*x+e)*EllipticF(sin(f*x+e),(-b/a)^(1/2))*(1+b*sin(f*x+e)^2/a)^(1/2)/b 
/f/(a+b*sin(f*x+e)^2)^(1/2)
 
3.2.28.2 Mathematica [A] (verified)

Time = 0.67 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.00 \[ \int \sin ^2(e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\frac {2 \sqrt {2} a (a+2 b) \sqrt {\frac {2 a+b-b \cos (2 (e+f x))}{a}} E\left (e+f x\left |-\frac {b}{a}\right .\right )-2 \sqrt {2} a (a+b) \sqrt {\frac {2 a+b-b \cos (2 (e+f x))}{a}} \operatorname {EllipticF}\left (e+f x,-\frac {b}{a}\right )+b (-2 a-b+b \cos (2 (e+f x))) \sin (2 (e+f x))}{6 \sqrt {2} b f \sqrt {2 a+b-b \cos (2 (e+f x))}} \]

input
Integrate[Sin[e + f*x]^2*Sqrt[a + b*Sin[e + f*x]^2],x]
 
output
(2*Sqrt[2]*a*(a + 2*b)*Sqrt[(2*a + b - b*Cos[2*(e + f*x)])/a]*EllipticE[e 
+ f*x, -(b/a)] - 2*Sqrt[2]*a*(a + b)*Sqrt[(2*a + b - b*Cos[2*(e + f*x)])/a 
]*EllipticF[e + f*x, -(b/a)] + b*(-2*a - b + b*Cos[2*(e + f*x)])*Sin[2*(e 
+ f*x)])/(6*Sqrt[2]*b*f*Sqrt[2*a + b - b*Cos[2*(e + f*x)]])
 
3.2.28.3 Rubi [A] (verified)

Time = 0.84 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.440, Rules used = {3042, 3649, 3042, 3651, 3042, 3657, 3042, 3656, 3662, 3042, 3661}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sin ^2(e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sin (e+f x)^2 \sqrt {a+b \sin (e+f x)^2}dx\)

\(\Big \downarrow \) 3649

\(\displaystyle \frac {1}{3} \int \frac {(a+2 b) \sin ^2(e+f x)+a}{\sqrt {b \sin ^2(e+f x)+a}}dx-\frac {\sin (e+f x) \cos (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{3} \int \frac {(a+2 b) \sin (e+f x)^2+a}{\sqrt {b \sin (e+f x)^2+a}}dx-\frac {\sin (e+f x) \cos (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}\)

\(\Big \downarrow \) 3651

\(\displaystyle \frac {1}{3} \left (\frac {(a+2 b) \int \sqrt {b \sin ^2(e+f x)+a}dx}{b}-\frac {a (a+b) \int \frac {1}{\sqrt {b \sin ^2(e+f x)+a}}dx}{b}\right )-\frac {\sin (e+f x) \cos (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{3} \left (\frac {(a+2 b) \int \sqrt {b \sin (e+f x)^2+a}dx}{b}-\frac {a (a+b) \int \frac {1}{\sqrt {b \sin (e+f x)^2+a}}dx}{b}\right )-\frac {\sin (e+f x) \cos (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}\)

\(\Big \downarrow \) 3657

\(\displaystyle \frac {1}{3} \left (\frac {(a+2 b) \sqrt {a+b \sin ^2(e+f x)} \int \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}dx}{b \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}-\frac {a (a+b) \int \frac {1}{\sqrt {b \sin (e+f x)^2+a}}dx}{b}\right )-\frac {\sin (e+f x) \cos (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{3} \left (\frac {(a+2 b) \sqrt {a+b \sin ^2(e+f x)} \int \sqrt {\frac {b \sin (e+f x)^2}{a}+1}dx}{b \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}-\frac {a (a+b) \int \frac {1}{\sqrt {b \sin (e+f x)^2+a}}dx}{b}\right )-\frac {\sin (e+f x) \cos (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}\)

\(\Big \downarrow \) 3656

\(\displaystyle \frac {1}{3} \left (\frac {(a+2 b) \sqrt {a+b \sin ^2(e+f x)} E\left (e+f x\left |-\frac {b}{a}\right .\right )}{b f \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}-\frac {a (a+b) \int \frac {1}{\sqrt {b \sin (e+f x)^2+a}}dx}{b}\right )-\frac {\sin (e+f x) \cos (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}\)

\(\Big \downarrow \) 3662

\(\displaystyle \frac {1}{3} \left (\frac {(a+2 b) \sqrt {a+b \sin ^2(e+f x)} E\left (e+f x\left |-\frac {b}{a}\right .\right )}{b f \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}-\frac {a (a+b) \sqrt {\frac {b \sin ^2(e+f x)}{a}+1} \int \frac {1}{\sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}dx}{b \sqrt {a+b \sin ^2(e+f x)}}\right )-\frac {\sin (e+f x) \cos (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{3} \left (\frac {(a+2 b) \sqrt {a+b \sin ^2(e+f x)} E\left (e+f x\left |-\frac {b}{a}\right .\right )}{b f \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}-\frac {a (a+b) \sqrt {\frac {b \sin ^2(e+f x)}{a}+1} \int \frac {1}{\sqrt {\frac {b \sin (e+f x)^2}{a}+1}}dx}{b \sqrt {a+b \sin ^2(e+f x)}}\right )-\frac {\sin (e+f x) \cos (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}\)

\(\Big \downarrow \) 3661

\(\displaystyle \frac {1}{3} \left (\frac {(a+2 b) \sqrt {a+b \sin ^2(e+f x)} E\left (e+f x\left |-\frac {b}{a}\right .\right )}{b f \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}-\frac {a (a+b) \sqrt {\frac {b \sin ^2(e+f x)}{a}+1} \operatorname {EllipticF}\left (e+f x,-\frac {b}{a}\right )}{b f \sqrt {a+b \sin ^2(e+f x)}}\right )-\frac {\sin (e+f x) \cos (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{3 f}\)

input
Int[Sin[e + f*x]^2*Sqrt[a + b*Sin[e + f*x]^2],x]
 
output
-1/3*(Cos[e + f*x]*Sin[e + f*x]*Sqrt[a + b*Sin[e + f*x]^2])/f + (((a + 2*b 
)*EllipticE[e + f*x, -(b/a)]*Sqrt[a + b*Sin[e + f*x]^2])/(b*f*Sqrt[1 + (b* 
Sin[e + f*x]^2)/a]) - (a*(a + b)*EllipticF[e + f*x, -(b/a)]*Sqrt[1 + (b*Si 
n[e + f*x]^2)/a])/(b*f*Sqrt[a + b*Sin[e + f*x]^2]))/3
 

3.2.28.3.1 Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3649
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)]^2), x_Symbol] :> Simp[(-B)*Cos[e + f*x]*Sin[e + f*x]*((a + b* 
Sin[e + f*x]^2)^p/(2*f*(p + 1))), x] + Simp[1/(2*(p + 1))   Int[(a + b*Sin[ 
e + f*x]^2)^(p - 1)*Simp[a*B + 2*a*A*(p + 1) + (2*A*b*(p + 1) + B*(b + 2*a* 
p + 2*b*p))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f, A, B}, x] && G 
tQ[p, 0]
 

rule 3651
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)]^2)/Sqrt[(a_) + (b_.)*sin[(e_.) + 
 (f_.)*(x_)]^2], x_Symbol] :> Simp[B/b   Int[Sqrt[a + b*Sin[e + f*x]^2], x] 
, x] + Simp[(A*b - a*B)/b   Int[1/Sqrt[a + b*Sin[e + f*x]^2], x], x] /; Fre 
eQ[{a, b, e, f, A, B}, x]
 

rule 3656
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[(Sqrt[a 
]/f)*EllipticE[e + f*x, -b/a], x] /; FreeQ[{a, b, e, f}, x] && GtQ[a, 0]
 

rule 3657
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[Sqrt[a 
+ b*Sin[e + f*x]^2]/Sqrt[1 + b*(Sin[e + f*x]^2/a)]   Int[Sqrt[1 + (b*Sin[e 
+ f*x]^2)/a], x], x] /; FreeQ[{a, b, e, f}, x] &&  !GtQ[a, 0]
 

rule 3661
Int[1/Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[(1/(S 
qrt[a]*f))*EllipticF[e + f*x, -b/a], x] /; FreeQ[{a, b, e, f}, x] && GtQ[a, 
 0]
 

rule 3662
Int[1/Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[Sqrt[ 
1 + b*(Sin[e + f*x]^2/a)]/Sqrt[a + b*Sin[e + f*x]^2]   Int[1/Sqrt[1 + (b*Si 
n[e + f*x]^2)/a], x], x] /; FreeQ[{a, b, e, f}, x] &&  !GtQ[a, 0]
 
3.2.28.4 Maple [A] (verified)

Time = 2.30 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.67

method result size
default \(-\frac {-b^{2} \left (\sin ^{5}\left (f x +e \right )\right )+\sqrt {\frac {\cos \left (2 f x +2 e \right )}{2}+\frac {1}{2}}\, \sqrt {\frac {a +b \left (\sin ^{2}\left (f x +e \right )\right )}{a}}\, F\left (\sin \left (f x +e \right ), \sqrt {-\frac {b}{a}}\right ) a^{2}+a \sqrt {\frac {\cos \left (2 f x +2 e \right )}{2}+\frac {1}{2}}\, \sqrt {\frac {a +b \left (\sin ^{2}\left (f x +e \right )\right )}{a}}\, F\left (\sin \left (f x +e \right ), \sqrt {-\frac {b}{a}}\right ) b -\sqrt {\frac {\cos \left (2 f x +2 e \right )}{2}+\frac {1}{2}}\, \sqrt {\frac {a +b \left (\sin ^{2}\left (f x +e \right )\right )}{a}}\, E\left (\sin \left (f x +e \right ), \sqrt {-\frac {b}{a}}\right ) a^{2}-2 \sqrt {\frac {\cos \left (2 f x +2 e \right )}{2}+\frac {1}{2}}\, \sqrt {\frac {a +b \left (\sin ^{2}\left (f x +e \right )\right )}{a}}\, E\left (\sin \left (f x +e \right ), \sqrt {-\frac {b}{a}}\right ) a b -a b \left (\sin ^{3}\left (f x +e \right )\right )+b^{2} \left (\sin ^{3}\left (f x +e \right )\right )+a b \sin \left (f x +e \right )}{3 b \cos \left (f x +e \right ) \sqrt {a +b \left (\sin ^{2}\left (f x +e \right )\right )}\, f}\) \(266\)

input
int(sin(f*x+e)^2*(a+b*sin(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)
 
output
-1/3*(-b^2*sin(f*x+e)^5+(cos(f*x+e)^2)^(1/2)*((a+b*sin(f*x+e)^2)/a)^(1/2)* 
EllipticF(sin(f*x+e),(-1/a*b)^(1/2))*a^2+a*(cos(f*x+e)^2)^(1/2)*((a+b*sin( 
f*x+e)^2)/a)^(1/2)*EllipticF(sin(f*x+e),(-1/a*b)^(1/2))*b-(cos(f*x+e)^2)^( 
1/2)*((a+b*sin(f*x+e)^2)/a)^(1/2)*EllipticE(sin(f*x+e),(-1/a*b)^(1/2))*a^2 
-2*(cos(f*x+e)^2)^(1/2)*((a+b*sin(f*x+e)^2)/a)^(1/2)*EllipticE(sin(f*x+e), 
(-1/a*b)^(1/2))*a*b-a*b*sin(f*x+e)^3+b^2*sin(f*x+e)^3+a*b*sin(f*x+e))/b/co 
s(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2)/f
 
3.2.28.5 Fricas [F]

\[ \int \sin ^2(e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\int { \sqrt {b \sin \left (f x + e\right )^{2} + a} \sin \left (f x + e\right )^{2} \,d x } \]

input
integrate(sin(f*x+e)^2*(a+b*sin(f*x+e)^2)^(1/2),x, algorithm="fricas")
 
output
integral(-sqrt(-b*cos(f*x + e)^2 + a + b)*(cos(f*x + e)^2 - 1), x)
 
3.2.28.6 Sympy [F]

\[ \int \sin ^2(e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\int \sqrt {a + b \sin ^{2}{\left (e + f x \right )}} \sin ^{2}{\left (e + f x \right )}\, dx \]

input
integrate(sin(f*x+e)**2*(a+b*sin(f*x+e)**2)**(1/2),x)
 
output
Integral(sqrt(a + b*sin(e + f*x)**2)*sin(e + f*x)**2, x)
 
3.2.28.7 Maxima [F]

\[ \int \sin ^2(e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\int { \sqrt {b \sin \left (f x + e\right )^{2} + a} \sin \left (f x + e\right )^{2} \,d x } \]

input
integrate(sin(f*x+e)^2*(a+b*sin(f*x+e)^2)^(1/2),x, algorithm="maxima")
 
output
integrate(sqrt(b*sin(f*x + e)^2 + a)*sin(f*x + e)^2, x)
 
3.2.28.8 Giac [F]

\[ \int \sin ^2(e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\int { \sqrt {b \sin \left (f x + e\right )^{2} + a} \sin \left (f x + e\right )^{2} \,d x } \]

input
integrate(sin(f*x+e)^2*(a+b*sin(f*x+e)^2)^(1/2),x, algorithm="giac")
 
output
integrate(sqrt(b*sin(f*x + e)^2 + a)*sin(f*x + e)^2, x)
 
3.2.28.9 Mupad [F(-1)]

Timed out. \[ \int \sin ^2(e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\int {\sin \left (e+f\,x\right )}^2\,\sqrt {b\,{\sin \left (e+f\,x\right )}^2+a} \,d x \]

input
int(sin(e + f*x)^2*(a + b*sin(e + f*x)^2)^(1/2),x)
 
output
int(sin(e + f*x)^2*(a + b*sin(e + f*x)^2)^(1/2), x)